import { AudioMgr } from "../../AudioMgr";
import { Constant } from "../../Constant";
import { Main } from "../../Main";
import StateBase from "../StateBase";

export default class SecondRole1EnterState extends StateBase {
    begin(preState: number): void {
        super.begin(preState);
      //  console.log('SecondRole1EnterState state--begin');
        const main = this.getUserData() as Main;
        main.enterRolesRoles[2].playAnimation();

        main.scheduleOnce(() => {

            AudioMgr.inst.playOneShot(main.heroEnter);
        }, 1)
        main.scheduleOnce(() => {

            main.mainFsm.goToState(Constant.MainState.LuckRecruitPrepare, main);
        }, 2)
    }
}